﻿@model Promocot.Models.Usuario

@{
    ViewBag.Title = "Agregar_Usuario";
}

@using (Html.BeginForm("Cargar_Usuario","Home",FormMethod.Post)) { 
    
    <table>
    <tr>
    <td>Nombre</td>
    <td>@Html.EditorFor(model=>model.nombre)</td>
    </tr>

    <tr>
    <td>Apellido</td>
    <td>@Html.EditorFor(model=>model.apellido)</td>
    </tr>

    <tr>
    <td>Login</td>
    <td>@Html.EditorFor(model=>model.login)</td>
    </tr>

    <tr>
    <td>Clave</td>
    <td>@Html.PasswordFor(model=>model.password)</td>
    </tr>
    <tr>
    
    <td>Email</td>
    <td>@Html.EditorFor(model=>model.email)</td>
    </tr>
    <tr>
    <td>Descripcion</td>
    <td>@Html.TextAreaFor(model=>model.descripcion)</td>
    </tr>
    
    <tr>
    <td>Teléfono</td>
    <td>@Html.EditorFor(model=>model.telefono)</td><td>@Html.HiddenFor(model=>model.cod_usuario)</td>
    </tr>

    <tr>
    <td>Rol</td>
    <td>@Html.DropDownList("rol", new SelectList(ViewBag.roles,"cod_rol","nombre"))</td>
    </tr>

     <tr>
    <td>Departamento</td>
    <td>@Html.DropDownList("departamento", new SelectList(ViewBag.departamentos,"Id","nombre"))</td>
    </tr>

    <tr>
    <td><input type="submit"  name="agregar" value="Agregar usuario"/></td>
    </tr>
    </table>


}